<link rel="stylesheet" type="text/css" href="<?php echo RM_Environment::getConnector()->getRootURL(); ?>RM/userdata/modules/Amenities/css/main.css">
<style type="text/css">
<!--
body {
    background-color: #FFFFFF;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
-->
</style>
<div class="RM_amenities_modal_header">
    <?php echo $this->_translate->_('User.Amenities.Main','UnitAmenities');?>
</div>
<div class="RM_amenities_body_area">
<table width='1' align='left' class='rm-module-amenities-search-amenity-cell-table'><tr>
<?php
$columns = 8;
$rowIndex = 0;
$count = 0;
$html = "";

if (count($this->amenityData) == 0){
    $html .= "<td nowrap align='center' width='300'>";
    $html .= $this->_translate->_('User.Amenities.Main','NoAmenities');
    $html .= "<td>";
} else {

    foreach($this->amenityData as $amenity){
        // create an amenities cell...

        $iconURL = RM_Environment::getConnector()->getRootURL()."RM/userdata/images/Amenities/" . $amenity['icon_url'];

        $html .= "<td valign='top' align='center' width='30'>";
        $html .= "<img src='" .$iconURL. "' alt='' height='30'><br/><div class='rm-module-amenities-amenity-cell-inner-textlabel'>" .$amenity['name']. "</div>";
        $html .= "<td>";


        // this adds a table row when we reach our number of configured columns
        $rowIndex = $count + 1;
        if(($rowIndex  % $columns) === 0){
            $html .= "</tr><tr>";
        }

        $count +=1;
    }
}
echo $html;
?>
</tr></table>
</div>